package org.szgb.console.cxht.entity;


import lombok.Data;
import lombok.EqualsAndHashCode;
import org.szgb.console.sys.line.entity.SysLineLocation;
import org.szgb.console.sys.line.entity.SysLineLocationSystemEquipment;
import org.szgb.core.base.entity.BeanEntity;

import java.io.Serial;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class CxhtLocationForm extends BeanEntity<CxhtLocationForm> {
    @Serial
    private static final long serialVersionUID = 1L;

    private SysLineLocation lineLocation;
    private CxhtForm cxhtForm;
    private SysLineLocationSystemEquipment equipment;
    private Integer performance;
    private Integer isArchive;
    private List<CxhtLocationFormItem> cxhtLocationFormItemList;
    private CxhtLocationFormItemTree cxhtLocationFormItemTree;

    public CxhtLocationForm() {
    }

    public CxhtLocationForm(String id) {
        this.setId(id);
    }

    public CxhtLocationForm(String lineLocationId, String cxhtFormId, String equipmentId) {
        this.lineLocation = new SysLineLocation(lineLocationId);
        this.cxhtForm = new CxhtForm(cxhtFormId);
        this.equipment = new SysLineLocationSystemEquipment(equipmentId);
        this.performance = 0;
        this.isArchive = 0;
    }
}
